import request from "@/api/request";
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";

/**
 * /excel/upload
 */
export function postExcelUpload(params: PostExcelUploadParams, input?: PostExcelUploadInput, config?: AxiosRequestConfig) {
    const paramsInput = {
        fileName: params.fileName,
        remark: params.remark,
    };
    return request.post<DeepRequired<any>>(`/excel/upload`, input, {
        params: paramsInput,
        ...config,
    });
}

export interface PostExcelUploadParams {
    fileName: string;
    remark?: string;
}

export interface PostExcelUploadInput {
    file: File;
}
